package com.niiwoo.civet.trade.service.local.contract;

import com.niiwoo.civet.trade.enums.FadadaContractTemplateEnum.TemplateTypeEnum;
import com.niiwoo.tripod.base.helper.BeanFactoryHelper;
import com.niiwoo.tripod.provider.exception.BizException;

public class FadadaContractFactory {

	public static FadadaContract buildFadadaContract(TemplateTypeEnum templateType) {
		FadadaContract fadadaContract = null;
		switch (templateType) {
		case FAST_LOAN:
			fadadaContract = BeanFactoryHelper.getBean(FastLoanContract.class);
			break;

		case ANTI_GUARANTEE:
			fadadaContract = BeanFactoryHelper.getBean(AntiGuaranteeContract.class);
			break;

		case ARBITRATION:
			fadadaContract = BeanFactoryHelper.getBean(ArbitrationContract.class);
			break;
			
		case CONSIGNOR_AUTHORIZE_PROTOCOL:
			fadadaContract = BeanFactoryHelper.getBean(ConsignorAuthorizeProtocol.class);
			break;
			
		case RISK_PROMPT:
			fadadaContract = BeanFactoryHelper.getBean(RiskPrompt.class);
			break;

        case ORG_COMPANY_FAST_LOAN:
            fadadaContract = BeanFactoryHelper.getBean(OrgCompanyFastLoanContract.class);
            break;

		case COMPANY_WITHHOLD:
			fadadaContract = BeanFactoryHelper.getBean(CompanyWithhold.class);
			break;

		case ORG_PERSONAL_FAST_LOAN:
			fadadaContract = BeanFactoryHelper.getBean(OrgPersonalFastLoanContract.class);
			break;

		case TO8TO_FAST_LOAN:
			fadadaContract = BeanFactoryHelper.getBean(To8ToFastLoanContract.class);
			break;

		case CREDITOR_TRANSFER_PROTOCOL:
			fadadaContract = BeanFactoryHelper.getBean(CreditorTransferContract.class);
			break;

		case CREDITOR_TRANSFER_RISK_PROMPT:
			fadadaContract = BeanFactoryHelper.getBean(CreditorTransferRiskPrompt.class);
			break;

		case JUN_TUO_COMPANY_FAST_LOAN:
			fadadaContract = BeanFactoryHelper.getBean(JunTuoCompanyFastLoanContract.class);
			break;

		case JUN_TUO_PERSONAL_FAST_LOAN:
			fadadaContract = BeanFactoryHelper.getBean(JunTuoPersonalFastLoanContract.class);
			break;

		case CREDIT_ENQUIRY_AUTHORIZATION:
			fadadaContract = BeanFactoryHelper.getBean(CreditEnquiryAuthorizationContract.class);
			break;

		case INTELLIGENCE_RISK_PROMPT:
			fadadaContract = BeanFactoryHelper.getBean(IntelligenceRiskPrompt.class);
			break;

		case INTELLIGENT_SERVICE_PROTOCOL:
			fadadaContract = BeanFactoryHelper.getBean(IntelligentServiceProtocol.class);
			break;

		case INFORMATION_INQUIRY_AUTHORIZATION:
			fadadaContract = BeanFactoryHelper.getBean(InformationInquiryAuthorization.class);
			break;

		case INFORMATION_CONSULTING_SERVICE_PROTOCOL:
			fadadaContract = BeanFactoryHelper.getBean(InformationConsultingServiceProtocol.class);
			break;

		default:
			throw new BizException("");
		}
		return fadadaContract;
	}
}
